home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / MISCEOUS / YRCAL17T.LZH / YEARCAL.DEF < prev    next >
Text File  |  1989-10-02  |  4KB  |  107 lines

  1. /********************************************************************
  2. **  YEARCAL.DEF v0.17T  Copyright (c) 1987, 1988, 1989 by Paul M. Sittler.
  3. **  All rights reserved.  The copyright owner hereby authorizes the
  4. **  no-charge, noncommercial making and/or distribution of copies of
  5. **  the entirety of this work unchanged and unincorporated in any
  6. **  other work (except "LiBRary" or "ARChive" disk files for the sole
  7. **  purpose of no-charge noncommercial distribution).  No other
  8. **  reproduction or use is authorized without the express prior
  9. **  written consent of the copyright owner.
  10. **
  11. **************************************************************/
  12.  
  13. #define DEF_SIG "Copyright 1988, 1989, Paul M. Sittler.  All rights reserved."
  14. #define ERROR    (-1)
  15. #define TRUE     1
  16. #define FALSE    0
  17. #define BUF    272
  18. #define LIN    80
  19.  
  20.  
  21. /* Function Prototypes */
  22. void agg_printer(int year, char out, char base,
  23.          int lang, char pause);
  24. void cal_printer(int year, char out,
  25.          int bm,   char fy,
  26.          int bd,   char base,
  27.          int lang, char pause);
  28. char *center(char *str, int width);
  29. char *char_str(int length, char c);
  30. void ferr( char *fmt);
  31. int  get_int(int defalt, int digits, int lowest, int highest);
  32. void get_opts(char *name);
  33. int  get_yn(char defalt);
  34. void hold(void);
  35. void jul_printer(int year, char out, char base,
  36.          int lang, char pause);
  37. int  leap(int years);
  38. void prep_cal(int year);
  39. void put_opts(char *name);
  40. void sched_printer(int year, char out,
  41.            int bm, int bd, int bh,
  42.            int nh, int pl, int pw,
  43.            char sched_type, char title[][LIN],
  44.            char base,  int lang,
  45.            char pause, int indent, int lds);
  46. void setup_files(char out);
  47. void signon(void);
  48. char *trim(char *str);
  49. int  weekday(int YYYY, int MM, int DD);
  50.  
  51.  
  52. struct month
  53. {
  54.     int  length;
  55.     int  first_day;
  56. };
  57.  
  58.  
  59.  
  60. struct options
  61. {
  62.     char signature[ sizeof(DEF_SIG) ];
  63.     int chksum;
  64.     int bh,    /* Beginning hour for schedules */
  65.       copies,   /* Number of copies to print */
  66.       indent,    /* Left Margin Indent in spaces */
  67.       lang,    /* Language desired for calendar */
  68.       lds,    /* Line Drawing Character set to use */
  69.       more_yrs, /* Number of successive periods to print */
  70.       nh,    /* Number of Hours to schedule */
  71.       pl,    /* Page Length in lines */
  72.       pw;    /* Page Width in characters or columns */
  73.     char aggie;    /* Aggie calendar flag */
  74.     char base;    /* Number base for Programmers Calendar, 0, H(ex), O(ctal) */
  75.     char fy;    /* Fiscal year flag */
  76.     char julian;/* Julian calendar flag */
  77.     char pause;    /* Page pause flag */
  78.     char mil;    /* Military time flag */
  79.     char sched_type;/* Schedule type M(onthly), W(eekly), D(aily) */
  80.     char title[8][LIN];
  81.     /* This structure also contains fields for every option that
  82.      * the user can change at runtime.  These are the default values
  83.      * that are used if no other values have been specified by the
  84.      * user during a run.
  85.      */
  86. } ;
  87.  
  88.  
  89.  
  90. struct LineDraw
  91. {
  92.     int nw,                /* North-West corner */
  93.     ne,                /* North-East corner */
  94.     se,                /* South-East corner */
  95.     sw,                /* South-West corner */
  96.     side,                /* Sides */
  97.     line,                /* Upper and lower frame */
  98.     ni,                /* North Intersection */
  99.     si,                /* South Intersection */
  100.     wi,                /* West Intersection */
  101.     ei,                /* East Intersection */
  102.     ns,                /* North-South (vertical) line */
  103.     ew,                /* East-West (horizontal) line */
  104.     isi,                /* Internal South Intersection */
  105.     cross;                /* Internal Cross Intersection */
  106. } ;
  107.